-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve robustness of builder (esp. on Windows) #6222
Conversation
- Use rimraf instead of a custom removeDirSync implementation - rimraf deals with edge cases like EPERM on Windows. - Detect when the process exits before it was requested via stop(), instead of running the cleanup handler. - Add fallback for process detection when the process exits before it was requested. On *nix systems, this is done via pkill and pgrep, on Windows this is done via wmic. - Add some asserts to check the preconditions of the methods, and output some status information to aid debugging in case of failure. I have verified that these changes work on ArchLinux and Windows XP, using Chrome and Firefox, as follows: 1. node make unittest 2. node make unittest 3. Restart the Firefox process via the task manager as soon as possible. 4. node make unittest 5. Temporary lock a file/directory within the temporary profile directory until the tests have finished, and then unlock the file within 10 seconds. In all cases, the auxilary browser processes are killed, and the temporary profile directory is wiped.
Thank you for looking into this, and good that you have reverted #6198 here. @brendandahl Could you review this PR? |
/botio lint |
From: Bot.io (Windows)ReceivedCommand cmd_lint from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/135a15b5452cd78/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_lint from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/9e7166a0aba4a9e/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/9e7166a0aba4a9e/output.txt Total script time: 0.79 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/135a15b5452cd78/output.txt Total script time: 1.05 mins
|
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/58babf0fd26bd61/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/8f1694f4439f7ac/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/8f1694f4439f7ac/output.txt Total script time: 0.63 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/58babf0fd26bd61/output.txt Total script time: 0.77 mins
|
/botio fonttest |
From: Bot.io (Linux)ReceivedCommand cmd_fonttest from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/4958c7980d36e96/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_fonttest from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/76d8b81a8c36d15/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/4958c7980d36e96/output.txt Total script time: 0.57 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/76d8b81a8c36d15/output.txt Total script time: 0.76 mins
|
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/67d1f56e0f2b274/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/a7b613c2c89014e/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/67d1f56e0f2b274/output.txt Total script time: 18.19 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/a7b613c2c89014e/output.txt Total script time: 18.66 mins
|
Improve robustness of builder (esp. on Windows)
Fixes #6216
See the commit message for the description of this fix + steps to tests. I have checked that the changes work by running them a few times on my Linux system, and over 10 times on a Windows XP box.
If you run botio on this PR, you will probably get the usual case (i.e. Firefox does not exit early, so the pid is known). To test the logic that gets activated when Firefox restarts, I submitted PR #6217, which is identical to this PR except that it includes a commit so that the code always assumes that the pid of the process is unknown (which was causing unreliability issues with our previous test runner).
Test output from #6217:
git revert [hash]
if we ever need to get verbose logging again.)